package com.ticket.sass.common.entity.tenant.enums

import com.baomidou.mybatisplus.annotation.IEnum
import com.fasterxml.jackson.annotation.JsonValue

enum class CouponUserMapUseState(private val value: Short, val tips: String) : IEnum<Short> {
    UNUSED(0, "未使用"),
    USED(1, "已使用");

    override fun getValue(): Short {
        return value
    }

    companion object {
        fun valueOf(v: Short) = CouponUserMapUseState.values().find { it.value == v } ?: error("未匹配到枚举")
    }

    @JsonValue
    open fun getValueForJson(): Short {
        return value
    }
}